package com.lzy.crm.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.lzy.crm.base.mybatis.BaseMapper;
import com.lzy.crm.base.page.PageQuery;
import com.lzy.crm.dao.criteria.ProfitCriteria;
import com.lzy.crm.domain.Profit;

public interface ProfitMapper extends BaseMapper<Profit, ProfitCriteria>{
	
	/**
	 * 查询分成明细
	 * @param userId
	 * @param pageQuery
	 * @return
	 */
	public List<Profit> getProfit(@Param("puid")Integer puid,@Param("uid")String uid,@Param("pageQuery")PageQuery pageQuery);

	
	/**
	 * 统计时间段总分润数
	 * @param parentId
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	public Integer getProfitStat(@Param("parentUserId")Integer parentUserId,@Param("startTime")String startTime,@Param("endTime")String endTime);

	/**
	 * 查询打过的局数
	 * @param userId
	 * @return
	 */
	public Integer getProfitGameCount(@Param("userId")Integer userId,@Param("startTime")String startTime,@Param("outStartTime")String outStartTime,@Param("outEndTime")String outEndTime);
}
